from flask_appbuilder import ModelView
from flask_appbuilder.fieldwidgets import Select2Widget
from flask_appbuilder.models.sqla.interface import SQLAInterface
from app.models import SerialPortCategory, SerialPort, Tag
from wtforms.ext.sqlalchemy.fields import QuerySelectField
from app import appbuilder, db


class TagView(ModelView):
    datamodel = SQLAInterface(Tag)

    list_columns = ['name']



appbuilder.add_view(TagView, "标签", icon="fa-folder-open-o", category="Company")

